package com.example.springdemo0921.springboot;

import lombok.Data;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

@Data
public class ProductRateConfig implements InitializingBean {

    private String sensitiveWordsFile;

    /**
     * 敏感词文件分隔符，支持正则
     */
    private String sensitiveWordSep;

    private String invalidCharsFile;

    /**
     * 无效词文件分隔符，支持正则
     */
    private String invalidWordSep;


    @PostConstruct
    public void init(){
        System.out.println("ProductRateConfig 初始化完成： "+this.toString());
    }

    @Override
    public void afterPropertiesSet() throws Exception {
        System.out.println("afterPropertiesSet 初始化完成： "+this.toString());

    }
}
